<?php
require_once '../zhifubao/Rsa.class.php';
require_once '../zhifubao/Base.class.php';
require_once '../zhifubao/Alipay.class.php';
//构建支付请求 可以传递MD5 RSA RSA2三种参数
$obj = new Alipay();

$data = [
    'payee_account'  => 'xxxxx', //收款方账户
    'amount'  => 'xxxx', //金额
];

//UTF-8格式的json数据
$res = iconv('gbk','utf-8',$obj->transfer($data));


echo '<pre>';
//转换为数组
$res = json_decode($res,true);

print_r($res);